<%@page import="HibernateBeans.CustomerDetails" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<!-- Representitive makes product selection on this page details from the customer details page are stored -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
</head>
<!-- Product Selection lay outs the tv plans and internet plans for the customer -->
<body>
    <jsp:useBean id="customer" class="HibernateBeans.CustomerDetails" scope="session">
        <jsp:setProperty name="customer" property="*" />
    </jsp:useBean>

    
    
    <html:form  method="get" action="/product_selection">
        <%-- <sql:query dataSource="jdbc/testdb" var="result_tv">SELECT * from ProductDetails where product_type = 'TV'</sql:query>
            <sql:query dataSource="jdbc/testdb" var="result_int">SELECT * from ProductDetails where product_type = 'INT'</sql:query>

		
            <table border="1" width="100%">
                <tr>
                    <th>Emp ID</th>
                    <th>First Name</th>
                    <th>Last Name</th>
                    <th>Age</th>
                </tr>
                <c:forEach var="row" items="${result_tv.rows}">
                    <tr>
                        <td>
                            <td>
                                <c:out value="${row.product_description}" />
                            </td>
                            <td>
                                <input type="radio" name=product <td>
                                <c:out value="${row.batch}" />
                            </td>
                            <td>
                                <c:out value="${row.marks}" />
                            </td>
                    </tr>
                </c:forEach>
            </table>--%>

			<!-- listing of plans -->
            <div align="center">
			<h2>PRODUCT SELECTION</h2>
            <table bgcolor="#FFFFCC" border="1" height="72" width="400" align="center">
                <tr>
                    <td align="center"><b>TV Plan${customer.first_name}</b></font>
                                
                    <td>

                        &nbsp&nbsp&nbsp<input type="radio" value=null name="product_tv">No TV<br>                        
                        &nbsp&nbsp&nbsp<input type="radio" value="P001" name="product_tv" />Basic Plan - 20 Channels<br>
                        &nbsp&nbsp&nbsp<input type="radio" value="P002" name="product_tv" />Economic Plan - 50 Channels<br>
                        &nbsp&nbsp&nbsp<input type="radio" value="P003" name="product_tv" />Premium Plan - 100 Channels<br>
                    </td>
                </tr>
            </table>
            <br>
            <br>
            <table bgcolor="#FFFFCC" border="1" height="72" width="400" align="center">
                <tr>
                    <td align="center"><b>Internet Plan</b>
                    </td>
                    <td>
                        &nbsp&nbsp<input type="radio" value=null name="product_internet" />No Internet<br>
                        &nbsp&nbsp<input type="radio" value="P004" name="product_internet">20 Mbps<br>
                        &nbsp&nbsp<input type="radio" value="P005" name="product_internet" />30 Mbps<br>
                        &nbsp&nbsp<input type="radio" value="P006" name="product_internet" />45 Mbps<br>
                        &nbsp&nbsp<input type="radio" value="P007" name="product_internet" />70 Mbps
                    </td>
                </tr>

            </table>
            <br>
            <input type="submit" name="Next Page" value="Next Page" align="center">
            <input type="reset" name="Reset" value="Reset" align="center">
                    
    </html:form>
</body>


</html>
